<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>列表页</title>
<link rel="stylesheet/less" type="text/css" href="__PUBLIC__/css/list.less" />
<!-- head -->
<include file="__VIEW__/Common/head.html"/>
<script type="text/javascript">
    var cid = '{$hd.get.cid|default:0}';
    var tagid = '{$hd.get.tagid|default:0}';
</script>
<script src="__PUBLIC__/js/list.js" type="text/javascript"></script>
<!-- 广告图片 -->
<a id="ad" href=""></a>
<!-- 产品列表 -->
<?php
    $cid=$_GET['cid'];
    $tagid = explode(',', rtrim($_GET['tagid'],','));
    // p($tagid);die;
?>
<ul id="list">
    <a href="{|U:'List/index'}">
        <li class="all_store <if value="$cid eq 0">all_this</if>">
            <div class="div0"></div>
            <span style="color: #ff2d4b;">全部</span>
            <div class="sanjiao1" style="display:block;"></div>
         </li>
    </a>

    <foreach from="$cate_data" value="$v">
    <a href="{|U:'List/index',array('cid'=>$v['cid'])}">
        <li>
            <div class="div{$v.cid}"></div>
            <span>{$v.cname}</span>
            <div class="sanjiao2"></div>
        </li>        
    </a>
    </foreach>
</ul>
<!-- 列表下布局 -->
<div id="listdown">
    <div id="listdown_left">
    <foreach from="$tag_data" value="$v">
        <span  data-type='{$v.tagid}' class="tag_search <if value="in_array($v['tagid'],$tagid)">tag_this</if>"><div></div>{$v.content}</span>
    </foreach>    
    </div>
    <form id="listdown_form" action="" method="">
        <input class="kuang" type="text" value="输入餐厅名搜索">
        <input class="submit" type="submit" value="">
    </form>
</div>
<!-- 店铺 -->
<ul id="dianpu">
    <foreach from="$sto_data" value="$v"> 
        <li>
            <a href="{|U:'Content/index',array('sid'=>$v['sid'])}"><div class="img"><img src="__ROOT__/{$v.store_picture}" alt=""></div></a>
            <div class="dianpu1">{$v.name}</div>
            <div class="dianpu2"><div class="star1"><div class="star2"></div></div>&nbsp;&nbsp;已售{$v.sendnum}份</div>
            <div class="dianpu3">起送: ¥{$v.start_price}&nbsp;&nbsp;&nbsp;配送: ¥{$v.sendprice}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$v.sendtime}分钟</div>
            <?php 
               $tag = explode(',', rtrim($v['tag'],',')); 
               // p($tag);
            ?>
            <div class="tag">
                <div class="tags1" style="display:none; <if value="in_array(3,$tag)">display:block;</if>"></div>
                <div class="tags2" style="display:none; <if value="in_array(2,$tag)">display:block;</if>"></div>
                <div class="tags3" style="display:none; <if value="in_array(1,$tag)">display:block;</if>"></div>
            </div>
            <div class="dianpu_show">
                <div class="dianpu_show_top">{$v.name}</div>
                <div class="dianpu_show_tag">            
                    <div class="tags1" style="display:none; <if value="in_array(3,$tag)">display:block;</if>"><div></div><span>下单免配送费</span></div>
                    <div class="tags2" style="display:none; <if value="in_array(2,$tag)">display:block;</if>"><div></div><span>下单立减8元,每天两单</span></div>
                    <div class="tags3" style="display:none; <if value="in_array(1,$tag)">display:block;</if>"><div></div><span>支持开发票</span></div>
                </div>
                <div class="dianpu_show_ads">
                    <div>商家公告</div>
                    <p>{$v.ads}</p>
                </div>
                <div class="dianpu_show_sj"></div>
            </div>
        </li>
    </foreach> 
</ul>
<!-- foot -->
<include file="__VIEW__/Common/foot.html"/>